import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Method_Overriding {
    public static void main(String args[]){
        try{
            BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
            int i=0;
            while(true){
                i=Integer.parseInt(b.readLine());
                if(i==42) break;
                System.out.println(i);
            }
        }
        catch(IOException e){
            
        }
    }
}
